package com.runfast.waimai.service;

import com.runfast.common.service.IService;
import com.runfast.waimai.dao.model.RunfastGoodsSellRecord;
import com.runfast.waimai.dao.model.RunfastGoodsSellRecordExample;
import com.runfast.waimai.util.PageBean;


import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import java.util.Date;
import java.util.List;
import java.util.Map;


public interface RunfastGoodsSellRecordService extends IService<RunfastGoodsSellRecord, Integer, RunfastGoodsSellRecordExample> {

    List<RunfastGoodsSellRecord> findByShopperIdAndStruts(Integer shopperid,  Integer status);
    List<RunfastGoodsSellRecord> findByShopperIdAndStrutsAndagree1(Integer shopperid,  Integer status);
    List<RunfastGoodsSellRecord> findByShopperIdAndStrutsAndagree2(Integer shopperid,  Integer status);
    public RunfastGoodsSellRecord findByShopperIdAndId(Integer id,Integer userid);

    RunfastGoodsSellRecord findByShopperIdAndOrderCode( Integer shopperid,  String ordercode);

    List<RunfastGoodsSellRecord> findById(Integer shopperid);
    RunfastGoodsSellRecord get(Integer id);
    RunfastGoodsSellRecord findByOrderCode(String ordercode);

    PageBean<RunfastGoodsSellRecord> getPageBean4Driver(Integer pageSize, Integer page, Integer otype, Integer shopperId, Integer agentid, Integer teamid);

    RunfastGoodsSellRecord update(RunfastGoodsSellRecord record);

    List<RunfastGoodsSellRecord> findBymonth(Integer id, Date createTime,Date createTime1);

   List< RunfastGoodsSellRecord> findBytime(Date parse, Date parse1, Integer id, int page, int rows, Integer agentid);
   // List<RunfastGoodsSellRecord> getInfo(Integer id);
    List<RunfastGoodsSellRecord> findListPageBean( Integer pageSize, Integer page,  Integer otype,  Integer shopperId,  Integer agentid,  Integer teamid);
    int findCount( Integer pageSize, Integer page,  Integer otype,  Integer shopperId, Integer agentid,  Integer teamid);


  //  public RunfastGoodsSellRecord findByShopperIdAndId(Integer id,Integer id1);

//    RunfastGoodsSellRecord findByShopperIdAndOrderCode(Integer id, String orderCode);

 //   List<RunfastGoodsSellRecord> findById(Integer shopperid);
 //   RunfastGoodsSellRecord get(Integer id);
 //   RunfastGoodsSellRecord findByOrderCode(String ordercode);

 //   PageBean<RunfastGoodsSellRecord> getPageBean4Driver(Integer pageSize,  Integer page, Integer otype,  Integer shopperId, Integer agentid, Integer teamid);

  //  RunfastGoodsSellRecord update(RunfastGoodsSellRecord record);

 //   List<RunfastGoodsSellRecord> findBymonth(Integer id, Date createTime,Date createTime1);

 //  List< RunfastGoodsSellRecord> findBytime(Date parse, Date parse1, Integer id, int page,  int rows, Integer agentid);
   // List<RunfastGoodsSellRecord> getInfo(Integer id);
 //   List<RunfastGoodsSellRecord> findListPageBean( Integer pageSize,  Integer page,  Integer otype, Integer shopperId,  Integer agentid, Integer teamid);
 //   int findCount( Integer pageSize, Integer page,  Integer otype,  Integer shopperId,  Integer agentid, Integer teamid);


  List<Map<String,String>> findByAgentnameAndbusinessnameAndTime(Integer agentid, String name, Date date1, Date date2,Integer isdelive);

    List<Map<String,String>> findAgentnameMoney(Date createtime1, Date createatime2,Integer isdeliver);

    List<Map<String,BigDecimal>> findshopperAndCityAndtime(String cityname, String shoppername, Date ceateatime1, Date ceateatime2, Integer page,Integer pagesize);

    int findByShopperIdOrderCodeCount(Integer shopperid);

    int findCountShopperOrder(Integer shopperid);

    int findCountStatus9(Integer shopperid);


    List<RunfastGoodsSellRecord> findaftertime(Date date1, Date date2, String cityname, String shoppername);

    List<RunfastGoodsSellRecord> finderrorOver(Date date1, Date date2, String cityname, String shoppername);
    List<RunfastGoodsSellRecord> findlastscore(Date date1, Date date2, String cityname, String shoppername);
    List<RunfastGoodsSellRecord> findToday(Integer id, Date date1,Date date2);
}